- content_for :extra_javascript do
  :javascript
    initIntercom();

- content_for :title do
  = t('admin2.sidebar.payment_system.country_currency')

.content-card-header
  %h1.content-card-header-title
    = t('admin2.sidebar.payment_system.country_currency')

.content-card-section-container
  = form_for @current_community, url: update_country_currencies_admin2_payment_system_country_currencies_path, html: { class: %i[content-card-section-form] }, method: :patch do |form|
    %section.content-card-section
      %h2
        = t('admin2.sidebar.payment_system.country_currency')
      .form-group
        = form.label :country, t('admin2.country_currency.country')
        = text_field_tag :country, country_name, class: %i[form-control], disabled: true
        %small#country-help.form-text
          = t('admin2.country_currency.country_info_text').html_safe
      .form-group
        = form.label :currency, t('admin2.country_currency.currency')
        - if payments_connected
          = text_field_tag :currency, currency, class: %i[form-control], disabled: true
        - else
          = form.select :currency, options_for_select(available_currencies, currency), {}, class: %i[form-control country-currency], data: {url: verify_currency_admin2_payment_system_country_currencies_path}

      = render 'admin2/payment_system/country_currencies/available_payment', stripe_allowed: stripe_allowed, paypal_allowed: paypal_allowed, country_name: country_name, currency: currency

    %section.content-card-terminal.without-margin
      = button_tag t('admin2.save_changes'), class: %i[btn btn-primary]
